Conversation
🤖 Augment PR SummarySummary: Adds Cmd+Up / Cmd+Down navigation to cycle between Home and enabled provider tabs in the panel. Changes:
Technical Notes: Key handling is attached at the window level and uses Meta-only (Cmd) with ArrowUp/ArrowDown; focus restoration is deferred via 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8cfe6a9. Configure here.
|
@codex review |
There was a problem hiding this comment.
Pull request overview
Adds Cmd+ArrowUp/ArrowDown keyboard navigation for the panel’s sidebar to cycle between Home and enabled provider views (wrapping at ends and skipping Settings), and updates focus handling so the shortcut works immediately after the panel becomes visible. Includes new hook-level and app-level regression tests covering navigation and focus behavior.
Changes:
- Add Cmd+ArrowUp/ArrowDown key handling in
usePanelto cycle views (Home + enabled providers), skipping Settings and ignoring editable targets. - Add “reclaim focus” behavior (window focus + visibility change + tray events) and make the panel container programmatically focusable via
tabIndex={-1}. - Add/extend unit and integration tests for navigation, editable-target ignoring, settings skipping, and focus regain.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/hooks/app/use-panel.ts | Implements Cmd+Arrow navigation and focus-reclaim behavior; updates types for displayPlugins. |
| src/hooks/app/use-panel.test.ts | Adds focused unit tests for view cycling, editable target ignoring, settings skip, and focus regain. |
| src/components/app/app-shell.tsx | Makes the panel container focusable (tabIndex={-1}) to support programmatic focus. |
| src/App.test.tsx | Adds an app-level regression test verifying Cmd+Up/Down tab switching after focus. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const focusContainer = useCallback(() => { | ||
| window.requestAnimationFrame(() => { | ||
| containerRef.current?.focus({ preventScroll: true }) | ||
| }) | ||
| }, []) | ||
|
|
||
| useEffect(() => { | ||
| const handleVisibilityChange = () => { | ||
| if (!document.hidden) { | ||
| focusContainer() | ||
| } | ||
| } | ||
|
|
||
| window.addEventListener("focus", focusContainer) | ||
| document.addEventListener("visibilitychange", handleVisibilityChange) |
There was a problem hiding this comment.
The new focus reclaim logic always focuses containerRef on window focus / tab visibility. This will steal focus from any currently focused element inside the panel (e.g. the Global Shortcut recorder uses a focused div[role="textbox"] and cancels recording on blur), causing UX regressions.
Consider only focusing the container when focus is currently outside the panel (e.g. if containerRef.current does not contain document.activeElement), or when document.activeElement is body/null. This preserves existing in-panel focus while still ensuring the panel becomes keyboard-active when first shown.

Description
Add
Cmd+Up/Cmd+Downnavigation for the open panel so the user can switch between Home and enabled provider tabs without reordering anything.The shortcut works immediately after opening from either the tray icon or the global shortcut because the panel now reclaims focus when it becomes visible.
The cycle wraps at the ends and skips Settings, and the change is covered with focused panel and app regression tests.
Related Issue
N/A
Type of Change
Testing
bun run buildand it succeededbun run testand all tests passbun tauri devbunx vitest run src/hooks/app/use-panel.test.ts src/App.test.tsxScreenshots
Keyboard-only change; no screenshot attached.
Checklist
mainbranchNote
Low Risk
Mostly adds client-side keyboard/focus handling with comprehensive tests; low risk aside from potential UX regressions from globally listening to
keydownand changing focus behavior.Overview
Adds Cmd+ArrowUp/ArrowDown keyboard navigation to cycle the panel sidebar between
homeand provider views (wrapping at ends), while skippingsettingsand ignoring key events originating from editable elements.Ensures the shortcut works immediately after the panel is shown by making the panel container focusable (
tabIndex={-1}) and auto-focusing it on window focus/visibility regain and after tray navigation/about events. Updates and expands hook/app tests to cover focus behavior and view-cycling edge cases.Reviewed by Cursor Bugbot for commit 0d6e0ed. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Add Cmd+Up/Down navigation to switch between Home and provider tabs in the panel. The panel now reclaims focus on window focus/visibility and after tray/about actions so the shortcut works immediately.
New Features
AppShellcontainer is focusable (tabIndex={-1}).Refactors
Written for commit 0d6e0ed. Summary will update on new commits.